<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <meta name="format-detection" content="telephone=no"/>
  <meta name="format-detection" content="email=no"/>
  <title>消息</title>
  <link rel="stylesheet" href="../../css/api.css">
  <link rel="stylesheet" href="../../css/vant.css">
  <link rel="stylesheet" href="../../css/main.css">
  <style></style>
</head>

<body>
<div class="app" v-cloak>
  <header>
    <div class="flex-x-sb">
      <span class="iconfont goback" @click="back">&#xe66f;</span>
      <div class="title">
        {{message.title}}
      </div>
    </div>
  </header>
  <div class="pt">
    <div class="info-detail" v-if="message.type == 2">
      <div class="info-f1" v-if="message.extra && message.extra.shopName">
        <span>店铺名称</span>
        <span>{{message.extra.shopName}}</span>
      </div>
      <div class="info-f1" v-if="message.extra && message.extra.name">
        <span>姓名</span>
        <span>{{message.extra.name}}</span>
      </div>
      <div class="info-f1" v-if="message.extra && message.extra.contactTels">
        <span>联系电话</span>
        <span>{{message.extra.contactTels}}</span>
      </div>
      <div class="info-f1" v-if="message.extra && message.extra.applyTime">
        <span>申请时间</span>
        <span>{{handleTimeYMDHmSZH(message.extra.applyTime)}}</span>
      </div>
      <div class="info-f1" v-if="message.extra && message.extra.refuseTime">
        <span>驳回时间</span>
        <span>{{handleTimeYMDHmSZH(message.extra.refuseTime)}}</span>
      </div>
      <div class="info-f1" v-if="message.extra && message.extra.memo">
        <span>驳回理由</span>
        <span>{{message.extra.memo}}</span>
      </div>
    </div>
    <div class="info-detail" v-else>
      <div class="info-f1">
        <span>消息内容</span>
        <span>{{message.content}}</span>
      </div>
      <div class="info-f1" v-if="message.extra && message.extra.shopName">
        <span>店铺名称</span>
        <span>{{message.extra.shopName}}</span>
      </div>
      <div class="info-f1" v-if="message.extra && message.extra.name">
        <span>姓名</span>
        <span>{{message.extra.name}}</span>
      </div>
      <div class="info-f1" v-if="message.extra && message.extra.contactTels">
        <span>联系电话</span>
        <span>{{message.extra.contactTels}}</span>
      </div>
      <div class="info-f1" v-if="message.extra && message.extra.memo">
        <span>备注</span>
        <span>{{message.extra.memo}}</span>
      </div>
      <div class="info-f1">
        <span>消息时间</span>
        <span>{{handleTimeYMDHmSZH(message.createTime)}}</span>
      </div>
    </div>
  </div>
  <div class="flex-x-c info-detail-button">
    <!--    认证审核成功-->
<!--    <div v-if="message.type == 1" @click="toAuthPage(message)">查看资料</div>-->
    <!--    认证审核失败-->
<!--    <div v-if="message.type == 2" @click="toAuthPage(message)">重新提交</div>-->
    <!--    商品审核通过-->
<!--    <div v-if="message.type == 3" @click="toProductPage(message)">修改商品信息</div>-->
    <!--    商品审核失败-->
    <div v-if="message.type == 4" @click="toProductPage(message)">修改商品信息</div>
    <!--    朋友圈启用-->
<!--    <div v-if="message.type == 6" @click="">修改商品信息</div>-->
<!--    &lt;!&ndash;    商品上架&ndash;&gt;-->
<!--    <div v-if="message.type == 7" @click="">修改商品信息</div>-->
<!--    &lt;!&ndash;    商品下架&ndash;&gt;-->
<!--    <div v-if="message.type == 8" @click="">修改商品信息</div>-->
<!--    &lt;!&ndash;    用户评论&ndash;&gt;-->
<!--    <div v-if="message.type == 9" @click="toCircleDetail(message.targetId)">查看动态</div>-->
<!--    &lt;!&ndash;    用户点赞&ndash;&gt;-->
<!--    <div v-if="message.type == 10" @click="toCircleDetail(message.targetId)">查看动态</div>-->
<!--    &lt;!&ndash;    视频审核成功&ndash;&gt;-->
<!--    <div v-if="message.type == 11" @click="">修改商品信息</div>-->
<!--    &lt;!&ndash;    视频审核失败&ndash;&gt;-->
<!--    <div v-if="message.type == 12" @click="">修改商品信息</div>-->
  </div>
</div>
<script src="../../script/api.js"></script>
<script src="../../script/flexible.js"></script>
<script src="../../script/fastclick.js"></script>
<script src="../../script/vue.min.js"></script>
<script src="../../script/iconfont.js"></script>
<script src="../../script/vant.min.js"></script>
<script src="../../script/restful.js"></script>
<script src="../../script/common.js"></script>
<script src="../../script/businessCommon.js"></script>
<script>
  apiready = function () {
    vm = new Vue({
      el: '.app',
      data: {
        message: api.pageParam.message
      },
      created() {
        if (this.message.extra) {
          this.message.extra = JSON.parse(this.message.extra);
        }
      },
      mounted() {

      },
      filters: {
        handleTimeYMDHmSZH
      },
      methods: {
        toProductPage(message) {
          if (!message.extra) {
            return ;
          }
          if (message.extra.type == 0) {
            // 出售
            api.openWin({
              name: 'release_edit_win',
              url: '../release/release_edit_win.html',
              bounces: false,
              pageParam: {
                editName: '设备出售',
                status: 'detail',
                data: {
                  id: message.targetId
                }
              },
            });
          } else if (message.extra.type == 1) {
            // 出租
            api.openWin({
              name: 'release_edit_win',
              url: '../release/release_edit_win.html',
              bounces: false,
              pageParam: {
                editName: '出租设备',
                status: 'detail',
                data: {
                  id: message.targetId
                }
              },
            });
          } else if (message.extra.type == 2) {
            // 配件
            api.openWin({
              name: 'release_edit_win',
              url: '../release/release_edit_win.html',
              bounces: false,
              pageParam: {
                editName: '配件',
                status: 'detail',
                data: {
                  id: message.targetId
                }
              },
            });
          }
        },
        toAuthPage(message) {
          if (!message.extra) {
            return ;
          }
          if (message.extra.type == 0) {
            api.openWin({
              name: 'personal_certification_win',
              url: 'widget://html/mine/personal_certification_win.html',
              bounces: false,
              pageParam: {
              }
            });
          } else if (message.extra.type == 1) {
            api.openWin({
              name: 'store_certification_win',
              url: 'widget://html/mine/store_certification_win.html',
              bounces: false,
              pageParam: {
              }
            });
          }
        },
        toCircleDetail(id) {
          api.openWin({
            name: 'circle_detail_win',
            url: 'widget://html/circle/circle_detail_win.html',
            bounces: false,
            pageParam: {
              topicId: id,
            }
          });
        },
        back() {
          api.closeWin();
        }
      },
    })
  }
</script>
</body>

</html>